//
//  CInfoView.h
//  HCHK_iphone
//
//  Created by yilong zhang on 12-1-1.
//  Copyright 2012年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "CMainPageCtrl.h"
#import "UIViewEx.h"
#import "CGalleryView.h" 
#import "CWaterFall.h"
#import "CTabView.h"
#import "CProduct.h"

@class CUser;

@protocol PhotoImagePickerDelegate;
@protocol CameraImagePickerDelegate;

@protocol InfoViewDelegate <NSObject>

@optional
-(void)DidClickButtonIndexInfoView:(UIButton*)button Object:(id)object;

@end

@interface CInfoView : UIViewEx <GalleryDelegate, WaterFallDelegate, ProductDelegate, UIActionSheetDelegate, PhotoImagePickerDelegate, CameraImagePickerDelegate>

@property (nonatomic, assign) id<InfoViewDelegate>  delegate;

//@property (nonatomic, assign) UIImageView   *m_IconBg;
@property (nonatomic, assign) UIImageView   *m_Icon;
@property (nonatomic, assign) UIButton      *m_IconBtn;

//imagepicker
@property (nonatomic, assign) UIActionSheet         *m_Sheet;
@property (nonatomic, assign) PhotosViewController  *m_PhotoCtrl;
@property (nonatomic, assign) CameraViewController  *m_CamareCtrl;

@property (nonatomic, assign) UILabel       *m_Nick;
@property (nonatomic, assign) UIButton      *m_MyAttention;
@property (nonatomic, assign) UIButton      *m_MyFriends;
@property (nonatomic, assign) UIButton      *m_LogOutBtn;
@property (nonatomic, assign) CWaterFall    *m_MyUpdGallery;
@property (nonatomic, assign) CAscCounter   *m_NativeCnt;
@property (nonatomic, assign) CAscCounter   *m_NetCnt;
@property (nonatomic, assign) CWaterFall    *m_MyFodGallery;
@property (nonatomic, assign) CAscCounter   *m_NativeMyfod;
@property (nonatomic, assign) CAscCounter   *m_NetCntMyfod;
@property (nonatomic, retain) CTask         *m_FavortTask;
@property (nonatomic, retain) CTask         *m_UploadTask;
@property (nonatomic, assign) UIImageView   *m_Sel;

@property (nonatomic, assign) UILabel       *m_MyTitle;
@property (nonatomic, assign) UILabel       *m_FrdTitle;
@property (nonatomic, assign) UILabel       *m_FrdNum;
@property (nonatomic, assign) UILabel       *m_PrdTitle;
@property (nonatomic, assign) UILabel       *m_PrdNum;
@property (nonatomic, assign) UILabel       *m_ComTitle;
@property (nonatomic, assign) UILabel       *m_ComNum;
@property (nonatomic, assign) UILabel       *m_NoFavos;

@property (nonatomic, assign) UIActivityIndicatorView *m_Indicator;

@property (nonatomic, assign) long          m_UserID;
@property (nonatomic, retain) NSMutableArray*m_Favorites;
@property (nonatomic, retain) NSMutableArray*m_Uploads;
@property (nonatomic, assign) BOOL          m_bIsMyFodLoading;
@property (nonatomic, assign) BOOL          m_bIsUpLoading;

-(void)SetInfoViewInfo;
-(void)AddProductsToGallery:(NSArray*)rets Type:(int)type;
-(void)AddProductsToGalleryWithDic:(NSArray*)rets;

-(void)GetFavorites;
-(NSArray*)GetNativeFavorites;
-(void)CommitGetFavoriteRequest;
//-(void)DidReceiveMyFavoritesFromSvr:(NSArray*)results Type:(int)type;
-(void)DidReceiveMyFavoritesFromSvr:(NSArray*)results;
-(void)GetMyUpload;
-(NSArray*)GetNativeUpload;
-(void)CommitGetMyUploadRequest;
//-(void)DidReceiveMyUploadDataFromSvr:(NSDictionary*)results Type:(int)type;
-(void)DidReceiveMyUploadDataFromSvr:(NSArray*)results;
-(void)UpdateUserPdtNum:(NSDictionary*)results;
-(void)ClearData;
-(void)OnButtonDown:(UIButton*)sender;
-(void)OnTabSelected:(UIButton*)sender;

//imagepicker
-(void)ShowPickerView;
-(void)DidPickerViewBtnDown:(int)sender;
-(void)DidPhotograph:(UIImage*)image;
-(void)OnIconBtnDown:(UIButton*)sender;

@end
